GooglePlus

Adobe AIR native extension

Google Plus AIR Native Extension

The extension is available here: com.distriqt.GooglePlus

Documentation



Setup your Google Project

1. Google Developers Console project
2. Android Certificate Fingerprint
3. Google Identity Options


Setup the Extension

1. Add the Extension
2. Initialise


Usage

1. Setup
2. Signing In/Out
3. Disconnect
4. Sharing a Post


External Links

- ASDocs

Sharing a Post

The Share dialog provides a means for users to share rich content from your app into the Google+ stream, including text, image, and URLs.

GooglePlus.service.addEventListener( GooglePlusShareEvent.SHARE_SUCCESS,   share_successHandler );
GooglePlus.service.addEventListener( GooglePlusShareEvent.SHARE_CANCELLED, share_cancelledHandler );
GooglePlus.service.addEventListener( GooglePlusShareEvent.SHARE_FAILED,    share_failedHandler );

// Create the post and set the prefilled information
var post:Post = new Post();
post.text 	= "This was posted using the GooglePlus #ANE";
post.url 	= "http://airnativeextensions.com/extension/com.distriqt.GooglePlus";

GooglePlus.service.share( post );
private function share_successHandler( event:GooglePlusShareEvent ):void
{
	trace( "Post shared successfully" );
}

private function share_cancelledHandler( event:GooglePlusShareEvent ):void
{
	trace( "Post sharing was cancelled by the user" );
}

private function share_failedHandler( event:GooglePlusShareEvent ):void
{
	trace( "Post sharing failed" );
}